import java.util.List;
import java.util.ArrayList;
import java.math.BigInteger;

public class problem25 {
    public static void main(String[] args) {
        List<BigInteger> fibonacciSequence = new ArrayList<BigInteger>();

        fibonacciSequence.add(BigInteger.valueOf(1));
        fibonacciSequence.add(BigInteger.valueOf(2));

        int sum = 2;
        int i = 2;
        do {
            fibonacciSequence.add(fibonacciSequence.get(i - 1).add(fibonacciSequence.get(i - 2)));
//            System.out.println(fibonacciSequence.get(i));
            if (String.valueOf(fibonacciSequence.get(i)).length() > 1000) {
                break;
            }
            i++;
        } while (true);

        System.out.println(i);
    }
}
